-
-
Notifications
You must be signed in to change notification settings - Fork 48
docs: add note about JavaScript-based locale files limited support #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add note about JavaScript-based locale files limited support #650
Conversation
|
docs/started.md
Outdated
@@ -177,6 +177,8 @@ This plugin provides some predefined configs. You can use the following configs | |||
|
|||
The `localePattern` options does not support SFC i18n custom blocks (`src` attribute), only for resources of files to import when specified in VueI18n's `messages` options (VueI18n v9 and later, `messages` specified in `createI18n`) for resources of files to import. | |||
|
|||
JavaScript-based locale files (e.g., `.js` and `.ts`) are not currently supported. For more information, please see [#32](https://github.com/intlify/eslint-plugin-vue-i18n/issues/32). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply. Thanks for the PR.
I don't think it's completely unsupported. I think we can use the js file to check with the no-missing-keys
rule.
https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys.html
However, rules that check locale files, such as the no-dynamic-keys
rule, are not supported.
https://github.com/intlify/eslint-plugin-vue-i18n/blob/master/docs/rules/no-dynamic-keys.md
Could you make some more changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ota-meshi, thanks for replying.
I've updated the warning to be more accurate:
"JavaScript-based locale files have limited support. JavaScript (.js
) files can be loaded and used with rules that check for missing keys (like no-missing-keys
), but TypeScript (.ts
) locale files are not supported. Rules that analyze locale file contents (like no-duplicate-keys-in-locale
and no-html-messages
) are not supported for either format. For more information, please see #32."
Can you confirm if this warning is accurate? I want to make sure I'm not spreading incorrect information about the plugin's capabilities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
This PR adds a note to clarify that JavaScript-based locale files (
.js
and.ts
) are not currently supported, with a reference to the relevant GitHub issue.This helps users understand the current limitations of the plugin and provides a link to track the feature request.
Thank you. #32